package com.rainwood.material.ui;

import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.rainwood.material.R;
import com.rainwood.material.base.BaseActivity;
import com.rainwood.material.view.titlebar.OnTitleBarListener;
import com.rainwood.material.view.titlebar.TitleBar;

/**
 * @auther : hhx
 * @date :  2021/3/5
 * @des :
 */
public class OperateSuccessActivity extends BaseActivity {
    private TitleBar titleBar;
    private LinearLayout llCenter;
    private Button btnSubmit;


    @Override
    protected int getLayoutId() {
        return R.layout.activity_operate_success;
    }

    @Override
    protected void initView() {
        titleBar = (TitleBar) findViewById(R.id.title_bar);
        llCenter = (LinearLayout) findViewById(R.id.ll_center);
        btnSubmit = (Button) findViewById(R.id.btn_submit);

        titleBar.setOnTitleBarListener(new OnTitleBarListener() {
            @Override
            public void onLeftClick(View v) {
                finish();
            }

            @Override
            public void onTitleClick(View v) {

            }

            @Override
            public void onRightClick(View v) {

            }
        });

        btnSubmit.setOnClickListener(v -> {
            turnToMainPage();
        });
    }

    private void turnToMainPage() {
        startActivity(new Intent(this, MainActivity.class));
    }

    @Override
    protected void initData() {

    }

    @Override
    public void onSuccess(String res, int Tag) {


    }

    @Override
    public void onFail(String res, int tag) {

    }

    @Override
    public void onError(String msg) {

    }
}
